<%@ page import="java.util.List" %>
<%@ page import="cc.geguo.entity.Admin" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/2/17
  Time: 12:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <title>列表</title>
</head>
<body>

<%
    List<Admin> list = (List<Admin>) pageContext.getSession().getAttribute("listAdmin");
    if (list!=null){
        for (Admin ad:list) {}
    }else {
        System.out.println("没有获取到列表数据");
    }
%>

<h2>欢迎你${userInfo.userName}</h2>

<table align="center" border="1">
    <tr>
        <td>序号</td>
        <td>用户名</td>
        <td>密码</td>
    </tr>

<%--<s:iterator var="admin" value="#session.listAdmin" status="st">
    <tr>
        <td>
            <s:property value="#st.count"/>
        </td>
        <td>
            <s:property value="#admin.userName"/>
        </td>
        <td>
            <s:property value="#admin.pwd"/>
        </td>
    </tr>
</s:iterator>--%>


    <c:forEach var="admin" items="${listAdmin}" varStatus="varStatus">
        <tr>
            <td>${varStatus.count}</td>
            <td>${admin.userName}</td>
            <td>${admin.pwd}</td>
        </tr>
    </c:forEach>


</table>

</body>
</html>
